<template>
	<hyb-page title="订单详情">
		<template v-slot:body>
			<view class="gui-card-view gui-bg-white gui-dark-bg-level-3 gui-margin-top-middle">
				<view class="gui-card-body  gui-flex gui-rows gui-nowrap gui-align-items-center">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">服务分类</text>
						</view>
						<text class="gui-text-small gui-block gui-secondary-text"
							style="margin-top:10rpx;">{{info.fa_fwstyle1}}-{{info.fa_fwstyle2}}</text>
					</view>
				</view>
			</view>

			<view class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">服务详情</text>
						</view>
						<text class="gui-text-small gui-block gui-secondary-text"
							style="margin-top:10rpx;">{{info.fa_fwcontent}}</text>
						

						<view v-if="info.fa_fwaddress1">
							<view class="gui-text-small  gui-flex gui-align-items-center" v-if="info.fa_fwaddress">
								<text class="gui-flex1">出发点：{{info.fa_fwaddress}}</text>
								<!-- #ifdef MP -->
								<text @tap="daohang()"
									class="gui-flex-shrink0 gui-margin-x gui-primary-color gui-underline">导航</text>
								<!-- #endif -->
							</view>

							<view class="gui-text-small gui-flex gui-align-items-center" v-if="info.fa_fwaddress1">
								<text class="gui-flex1">到达点：{{info.fa_fwaddress1}}</text>

								<!-- #ifdef MP -->
								<text @tap="daohang(1)"
									class="gui-flex-shrink0 gui-margin-x gui-primary-color gui-underline">导航</text>
								<!-- #endif -->
							</view>
							<view class="gui-flex gui-align-items-center" v-if="info.fa_name1">
								<text class="gui-text-small gui-block gui-secondary-text">收件人姓名：{{info.fa_name1}}</text>
							</view>


							<view class="gui-flex gui-align-items-center"
								v-if="  info.yg_flag || tag=='manage' ||  tag=='dl'  || tag == 'yh'">
								<text
									class="gui-text-small gui-block gui-secondary-text">收件人电话：{{info.fa_fwtelphone1}}</text>

								<text v-if="tag != 'yh'" @tap="call(info.fa_fwtelphone1)"
									class="gui-color-blue7 gui-icons gui-margin-x"
									style="font-size: 40rpx;color:#2497ee">
									&#xe60c;
								</text>
							</view>


							<map id="map" style="width: 100%; height: 200px;" class="gui-margin-top-small"
								:latitude="info.fa_fwlatitude" :markers="markers" :longitude="info.fa_fwlongitude"
								:polygons="[{strokeColor:'#990000',points:[{latitude:info.fa_fwlatitude,longitude:info.fa_fwlongitude},{latitude:info.fa_fwlatitude1,longitude:info.fa_fwlongitude1}]}]">
							</map>
						</view>

						<hyb-preview v-if="info.fa_fwimgpath" :items="info.fa_fwimgpath" class="gui-margin-top-middle">
						</hyb-preview>


						<view v-if="$store.state.base.uniacid == 43">

							<view class="gui-text-small  gui-flex gui-align-items-center" v-if="info.fa_fwaddress">
								<text class="gui-flex1">服务开始时间：{{info.fa_fwtime}}</text>
							</view>
							<view class="gui-text-small gui-padding-y-small gui-flex gui-align-items-center"
								v-if="info.fa_fwaddress">
								<text class="gui-flex1">服务天数：{{info.o_num}}</text>
							</view>

							<view class="gui-text-small  gui-flex gui-align-items-center" v-if="info.fa_fwaddress">
								<text class="gui-flex1">服务结束时间：{{getEndDate()}}</text>
							</view>
						</view>

						<!-- <hyb-preview type="video" :items="info.fa_videos" class="gui-margin-top-middle"></hyb-preview> -->
					</view>
				</view>
			</view>

			<view v-if="info.fa_guiges" class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">服务规格</text>
						</view>
						<view v-for="(guige,index) in info.fa_guiges" :key="index"
							class="gui-flex gui-align-items-center gui-padding-y" :class="{'gui-border-t':index>0}">
							<!-- <image :src="info.x_thumb" style="height: 160rpx;width: 160rpx;" mode="aspectFit"></image> -->

							<view class="gui-text gui-flex1 gui-margin-x">
								<!-- <view class="gui-flex">
									<text>{{guige.x_name}}</text>
								</view> -->

								<view class="gui-color-gray gui-margin-top-middle-small gui-text-small">
									规格：{{guige.name}}
								</view>

								<view class="gui-color-red gui-margin-top-middle-small gui-text-right gui-bold">
									￥{{guige.money}} x {{guige.num}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>


			<view v-if="info.form_data"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle gui-border-b">
				<view class="gui-card-body  gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-space-between gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">机构信息</text>

							<button type="default" @tap="privacy()"
								class="gui-button-mini gui-margin-x gui-bg-red gui-color-white">
								查看协议
							</button>
						</view>

						<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
							医院：{{info.form_data.company}}</view>
						<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
							科室：{{info.form_data.dept}}</view>

						<view class="gui-flex gui-space-between">
							<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
								床号：{{info.form_data.bed_num||'-'}}</view>
							<view class="gui-padding-x">
								<hyb-popup-input title="修改床号" is-input placeholder="请输入床号"
									@comfirm="saveFormData">修改</hyb-popup-input>
							</view>
						</view>
					</view>
				</view>
			</view>

			<view v-if="info.form_data"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle gui-border-b">
				<view class="gui-card-body  gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-space-between gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">下单人信息</text>
						</view>

						<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
							下单人：{{info.form_data.u_name}}</view>
						<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
							联系电话：{{info.form_data.u_phone}} <text @tap="call(info.form_data.u_phone)"
								class="gui-icons gui-margin-left gui-primary-color"
								style="font-size: 40rpx;">&#xe60c;</text></view>

					</view>
				</view>
			</view>


			<view v-if="info.form_data"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle gui-border-b">
				<view class="gui-card-body  gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-space-between gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">服务对象</text>
						</view>

						<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
							姓名：{{info.form_data.name}}</view>
						<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
							性别：{{info.form_data.sex}}</view>
						<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
							年龄：{{info.form_data.age}}</view>
						<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
							手机号：{{info.form_data.phone}} <text @tap="call(info.form_data.phone)"
								class="gui-icons gui-margin-left gui-primary-color"
								style="font-size: 40rpx;">&#xe60c;</text></view>
						<!-- <view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
							身份证号：{{info.form_data.id_num}}</view> -->

						<view class="gui-flex gui-space-between">
							<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
								身份证号：{{info.form_data.id_num||'-'}}</view>
							<view class="gui-padding-x">
								<hyb-popup-input title="修改身份证号" is-input placeholder="请输入身份证号"
									@comfirm="saveFormData1">修改</hyb-popup-input>
							</view>
						</view>
						<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small">
							与服务对象关系：{{info.form_data.type}}</view>
					</view>
				</view>
			</view>


			<view class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle gui-border-b">
				<view class="gui-card-body  gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-space-between gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">联系人信息</text>
						</view>


						<view class="gui-text-small gui-block gui-secondary-text gui-margin-top-small"
							v-if="info.fa_name != '到店服务'">
							发布人：{{info.fa_name}}</view><text v-if="$store.state.base.jb_bj_ms != 1"
							class="gui-text-small gui-block gui-secondary-text">
							支付状态：{{ info.is_pay === 1 ? `已付款（${info.fa_pay_type}）` : '未付款' }}
						</text>
						<text v-if="info.fa_fwmoney > 0"
							class="gui-text-small gui-block gui-secondary-text">{{info.jb_yusuan > 0 ? '定金':'订单金额'}}：{{info.fa_fwmoney}}</text>
						<text v-if="info.jb_yusuan > 0"
							class="gui-text-small gui-block gui-secondary-text">预算：{{info.jb_yusuan}}</text>
							<text class="gui-text-small gui-block gui-secondary-text">订单类型：{{info.fa_fwpay_type}}</text>
							<text class="gui-text-small gui-block gui-secondary-text">订单编号：{{info.fa_ordersn}}</text>
						<text class="gui-text-small gui-block gui-secondary-text">发布时间：{{info.fa_time}}</text>

						<text v-if="info.che_pai"
							class="gui-text-small gui-block gui-secondary-text">车牌号：{{info.che_pai}}</text>
						<text v-if="info.che_xing_hao"
							class="gui-text-small gui-block gui-secondary-text">车型号：{{info.che_xing_hao}}</text>
						<!-- <text class="gui-text-small gui-block gui-secondary-text">订单地址：{{info.fa_fwaddress}}</text>
							<text class="gui-text-small gui-block gui-secondary-text">详细地址：{{info.fa_fwaddresss}}</text> -->
						<view>

							<view class="gui-flex  gui-align-items-center">
								<text v-if="info.fa_name == '到店服务'"
									class="gui-flex1 gui-text-small gui-block gui-secondary-text">门店地址：{{info.fa_fwaddress}}<text
										v-if="  info.yg_flag || tag=='manage' ||  tag=='dl'  || tag == 'yh'">{{info.fa_fwaddresss}}</text></text>
								<text v-else
									class="gui-flex1 gui-text-small gui-block gui-secondary-text">订单地址：{{info.fa_fwaddress}}<text
										v-if="  info.yg_flag || tag=='manage' ||  tag=='dl'  || tag == 'yh'">{{info.fa_fwaddresss}}</text></text>

								<!-- #ifdef MP -->
								<text @tap="daohang()" class="gui-flex-shrink0 gui-margin-x gui-primary-color">导航</text>
								<!-- #endif -->
							</view>


							<view class="gui-flex gui-align-items-center"
								v-if="  info.yg_flag || tag=='manage' ||  tag=='dl'  || tag == 'yh'">
								<text v-if="info.fa_name == '到店服务'"
									class="gui-text-small gui-block gui-secondary-text">商家电话：{{info.fa_fwtelphone}}</text>
								<text v-else
									class="gui-text-small gui-block gui-secondary-text">联系电话：{{info.fa_fwtelphone}}</text>

								<text v-if="tag != 'yh' || info.fa_name == '到店服务'" @tap="call(info.fa_fwtelphone)"
									class="gui-color-blue7 gui-icons gui-margin-x"
									style="font-size: 40rpx;color:#2497ee">
									&#xe60c;
								</text>
							</view>
						</view>
						<text v-if="$store.state.base.jb_bj_ms != 1 && (info.o_status == 25 || info.o_status == 20  )"
							class="gui-text-small gui-block gui-secondary-text"
							style="margin-top:1rpx;">预约时间：{{info.fa_fwtime}}
							<text @tap="changeTime"
								class="gui-margin-x gui-primary-color gui-underline">{{info.fa_fwtime?'修改时间':'设定时间'}}</text>
						</text>


						<text v-for="(val,key) in info.fb_attributes" :key="key"
							class="gui-text-small gui-block gui-secondary-text"
							style="margin-top:10rpx;">{{key}}：{{val}}</text>
					</view>
				</view>
			</view>

			<!-- 项目所属商家收款信息 -->
			<view class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle gui-border-b" v-if="
			    info.merchant && (
			      info.merchant.s_gongsi_m || 
			      info.merchant.s_kai_hu_hang || 
			      info.merchant.s_shou_kuan || 
			      info.cw_beizhu1
			    )
			  ">
				<view class="gui-card-body  gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-space-between gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">收款信息</text>
						</view>

						<!-- 公司名称 -->
						<view class="gui-flex gui-nowrap gui-items-center">
							<text
								class="gui-text-small gui-block gui-secondary-text flex-1">公司名称：{{info.merchant.s_gongsi_m}}</text>
							<view class="gui-padding-left-sm" @click="copyText(info.merchant.s_gongsi_m || '')">
								<text class="gui-color-blue7 gui-icons gui-margin-x"
									style="float: right;font-size: 25rpx;color:#2497ee">
									复制
								</text>
							</view>
						</view>

						<!-- 开户银行 -->
						<view class="gui-flex gui-nowrap gui-items-center">
							<text
								class="gui-text-small gui-block gui-secondary-text flex-1">开户银行：{{info.merchant.s_kai_hu_hang}}</text>
							<view class="gui-padding-left-sm" @click="copyText(info.merchant.s_kai_hu_hang || '')">
								<text class="gui-color-blue7 gui-icons gui-margin-x"
									style="float: right;font-size: 25rpx;color:#2497ee">
									复制
								</text>
							</view>
						</view>

						<!-- 开户账号 -->
						<view class="gui-flex gui-nowrap gui-items-center">
							<text
								class="gui-text-small gui-block gui-secondary-text flex-1">开户账号：{{info.merchant.s_shou_kuan}}</text>
							<view class="gui-padding-left-sm" @click="copyText(info.merchant.s_shou_kuan || '')">
								<text class="gui-color-blue7 gui-icons gui-margin-x"
									style="float: right;font-size: 25rpx;color:#2497ee">
									复制
								</text>
							</view>
						</view>
						<!-- 开户账号 -->
						<view class="gui-flex gui-nowrap gui-items-center">
							<text
								class="gui-text-small gui-block gui-secondary-text flex-1">订单号：{{info.fa_ordersn}}</text>
							<view class="gui-padding-left-sm" @click="copyText(info.fa_ordersn || '')">
								<text class="gui-color-blue7 gui-icons gui-margin-x"
									style="float: right;font-size: 25rpx;color:#2497ee">
									复制
								</text>
							</view>
						</view>

						<!-- 备注 -->
						<view class="gui-flex gui-nowrap gui-items-center">
							<text
								class="gui-text-small gui-block gui-secondary-text flex-1">付款备注：{{info.cw_beizhu1}}</text>
							<view class="gui-padding-left-sm" @click="copyText(info.cw_beizhu1 || '')">
								<text class="gui-color-blue7 gui-icons gui-margin-x"
									style="float: right;font-size: 25rpx;color:#2497ee">
									复制
								</text>
							</view>
						</view>
					</view>
				</view>
			</view>

			<view v-if="info.yh_bei_zhu" class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">用户备注</text>
						</view>
						<view class="gui-text gui-color-gray">{{info.yh_bei_zhu}}</view>
					</view>
				</view>
			</view>

			<view v-if=" base.show_base.bmlb && ( tag=='manage' ||  tag=='dl'  || tag == 'yh')"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">报名列表</text>
						</view>


						<view v-if="info.qiangdan && info.qiangdan.length>0" v-for="(item,index) in info.qiangdan"
							:key="index">
							<view v-if="item.yuangong"
								class="gui-list-items gui-bg-white gui-border-b gui-padding gui-border-radius-large gui-margin-top-middle"
								@tap="choose(item)">
								<image style="width: 160rpx;height: 200rpx;" mode="aspectFill"
									:src="item.yuangong.y_thumb || $store.state.base.yg_set.yg_lb_tu">
								</image>
								<view class="gui-list-body">
									<view class="gui-list-title">
										<view
											class="gui-text gui-primary-text gui-ellipsis gui-flex gui-space-between gui-flex1">
											<text>{{item.yuangong.y_name}}</text>
											<text class="gui-text-small bold gui-margin-left gui-bold"
												:class="item.q_styles=='已录用'?'gui-color-grey2':'gui-color-grey2'">{{item.q_styles}}</text>
											<text class="gui-text-small gui-color-red bold gui-margin-left"
												v-if="item.distance != null">距我{{item.distance}}公里</text>
										</view>
									</view>
									<view class="gui-list-body-desc gui-margin-top-middle-middle">
										<view class="gui-flex gui-row gui-nowrap gui-align-items-center  gui-flex1">
											<view>好评：</view>
											<gui-star :activecolor="base.qjcolor" fontSize="30rpx" :totalstars="5"
												:starnum="4" :cantap="false"></gui-star>
										</view>

										<view
											class="gui-flex gui-row gui-nowrap gui-align-items-center  gui-flex1 gui-margin-top-middle-middle"
											v-if="item.yuangong.y_jinengs">
											<view>技能：</view>
											<gui-tags :siz="20"
												v-for="(jineng,index) in item.yuangong.y_jinengs.splice(0,2)"
												:text="jineng.xt_name"
												:customClass="['gui-bg-gray','gui-color-black','gui-ellipsis']">
											</gui-tags>
										</view>

										<view
											class="gui-flex gui-row gui-nowrap gui-align-items-center  gui-flex1 gui-margin-top-middle-middle"
											v-if="item.yuangong.y_jinengs">
											<view>服务人数：{{item.yuangong.fw_count}}</view>
											<view></view>
										</view>
									</view>

								</view>
							</view>
							<view v-if="(tag=='yh' || tag=='manage' || tag=='dl') && item.jishi_money>0"
								class="gui-flex gui-space-between gui-align-items-center gui-padding-y">
								<view class="gui-text-small gui-color-red" v-if="info.fa_fwpay_type=='参与竞标'">
									{{$store.state.base.show_base.shifu_bie_ming}}报价：￥{{item.jishi_money}}
								</view>
								<button v-if="tag == 'yh' && info.fa_fwpay_type=='参与竞标' && info.o_status==15"
									type="default" @tap="confirm_baojia(item)"
									class="gui-button-mini gui-margin-x gui-bg-red gui-color-white">
									同意报价
								</button>
							</view>
						</view>

						<view v-else class="gui-text-small gui-margin-top-middle">
							暂无报名！
						</view>
					</view>
				</view>
			</view>

			<view v-else-if="info.qiangdan && info.uniacid == 23"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<text
					class="gui-card-name gui-primary-text gui-bold">已有{{info.qiangdan.length}}名{{$store.state.base.show_base.shifu_bie_ming}}报名</text>

			</view>


			<view v-if="info.jb_yusuan > 0"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">竞标预算：{{info.jb_yusuan}}</text>
						</view>
						<!-- <text class="gui-text gui-color-red">￥：{{info.jb_yusuan||0}}</text> -->
					</view>
				</view>
			</view>



			<view class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle"
				v-if="tag=='yg' && info.yg_flag && base.show_base.qian_dao==1">
				<view class="gui-card-body gui-border-b gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-space-between">
							<text
								class="gui-card-name gui-primary-text gui-bold">{{$store.state.base.show_base.shifu_bie_ming}}签到</text>

							<view v-if="info.o_status == 25" @tap="qiandao"
								class="gui-text-small gui-bg-red gui-color-white gui-padding-small gui-border-radius gui-icons">
								&#xe61c; 签到</view>
						</view>
						<view class="gui-margin-top-middle" v-if="info.qiandao">
							<view class="gui-flex gui-space-between gui-padding-y gui-border-b">
								<view class="gui-text">签到地址：{{info.qiandao.qian_dao_dizhi}}</view>
							</view>

							<view class="gui-flex gui-space-between gui-padding-y gui-border-b">
								<view class="gui-text">签到时间：{{info.qiandao.qian_dao_time}}</view>
							</view>
						</view>
						<view v-else class="gui-text gui-margin-top-middle">
							没有签到数据！
						</view>
					</view>
				</view>
			</view>


			<view class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle"
				v-if="base.show_base.kao_qing==1 && tag=='yg' && info.yg_flag">

				<view class="gui-card-body gui-border-b gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-space-between">
							<text class="gui-card-name gui-primary-text gui-bold">打卡记录</text>

							<view v-if="info.o_status == 25" @tap="kaoqin"
								class="gui-text-small gui-bg-red gui-color-white gui-padding-small gui-border-radius gui-icons">
								&#xe6d1; 打卡</view>

						</view>
						<view class="gui-margin-top-middle" v-if="info.kaoqin">
							<view class="gui-flex gui-space-between gui-padding-y gui-border-b">
								<view class="gui-text-small">打卡地址：{{info.kaoqin.k_address}}</view>
							</view>

							<view class="gui-flex gui-space-between gui-padding-y gui-border-b">
								<view class="gui-text-small">打卡时间：{{info.kaoqin.k_time}}</view>
							</view>

						</view>

						<view v-else class="gui-text-small gui-margin-top-middle">
							今日未打卡！
						</view>
					</view>
				</view>
			</view>



			<view v-if="base.show_base.pei_jian == 1"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-border-b gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-space-between">
							<text class="gui-card-name gui-primary-text gui-bold">配件信息</text>

							<view
								v-if="(info.o_status > 15 || info.o_status < 25) && (tag=='manage' || tag=='dl' || info.yg_flag)"
								@tap="open"
								class="gui-text-small gui-bg-blue gui-color-white gui-padding-small gui-border-radius gui-icons">
								&#xe6c7; 添加配件</view>
						</view>
						<view class="gui-margin-top-middle" v-if="items.length>0">
							<view class="gui-flex gui-space-between gui-align-items-center  gui-padding-y gui-border-b"
								v-for="(item,index) in items" :key="index">
								<view class="gui-text gui-ellipsis" style="width: 200rpx;">{{item.p_name}}</view>
								<gui-step-box v-if="(info.o_status > 15 || info.o_status < 25) && info.yg_flag"
									:inputClass="['gui-step-box-input','gui-border-radius', 'gui-bg-gray', 'gui-dark-bg-level-2']"
									@change="amoutChange" :index="index" :value="item.amount"></gui-step-box>
								<view class="gui-text-small gui-margin-x">{{item.amount * item.p_jiage}}元</view>
							</view>
						</view>

						<view v-else class="gui-text-small gui-margin-top-middle">
							暂无配件！
						</view>
					</view>
				</view>



				<view class="gui-padding">
					<view v-if="base.show_base.pei_jian==1">
						<!-- <view v-if=" tag=='manage' || info.yg_flag"
							class="gui-form-item gui-border-b gui-margin-top-middle">
							<text class="gui-form-label gui-secondary-text">回桶数量</text>
							<view class="gui-form-body gui-padding-x">
								<input type="number" class="gui-form-input" v-model="formData.hui_tong"
									placeholder="请输入回桶数量" />
							</view>
						</view>

						<view v-if=" tag=='manage' || info.yg_flag" class="gui-form-item gui-border-b">
							<text class="gui-form-label gui-secondary-text">欠桶数量</text>
							<view class="gui-form-body  gui-padding-x">
								<input type="number" class="gui-form-input" v-model="formData.qian_tong"
									placeholder="请输入欠桶数量" />
							</view>
						</view> -->


						<view class="gui-form-item gui-border-b" v-if="info.yg_flag ||  tag=='manage'">
							<text class="gui-form-label gui-secondary-text">产品总金额</text>
							<view class="gui-form-body  gui-padding-x">
								<input type="number" class="gui-form-input" disabled v-model="info.pei_jian_money"
									placeholder="" />
							</view>
						</view>

						<view v-if="base.pjcb">
							<!-- <view v-if=" (tag=='manage' || info.yg_flag ) && base.je_dan_ms"
								class="gui-form-item gui-border-b">
								<text class="gui-form-label gui-secondary-text">配件成本</text>
								<view class="gui-form-body  gui-padding-x">
									<input type="number" class="gui-form-input" v-model="info.fa_pei_jian_cb"
										placeholder="" />
								</view>
							</view> -->
							<view v-if=" (tag=='manage' || info.yg_flag ) && base.je_dan_ms"
								class="gui-form-item gui-border-b">
								<text class="gui-form-label gui-secondary-text">服务金额</text>
								<view class="gui-form-body  gui-padding-x">
									<input type="number" class="gui-form-input"
										:disabled="info.o_status > 25 || formData.is_pay == 1"
										v-model="info.fa_lin_shi_money" placeholder="" />
								</view>
							</view>
						</view>

						<view class="gui-form-item gui-border-b" v-if="info.yg_flag ||  tag=='manage'">
							<text class="gui-form-label gui-secondary-text">订单总金额</text>
							<view class="gui-form-body  gui-padding-x">
								<input type="number" class="gui-form-input" disabled v-model="heji_money"
									placeholder="" />
							</view>
						</view>
					</view>
					<view v-if="base.show_base.guan_li == 1" class="gui-form-item gui-border-b">
						<text class="gui-form-label gui-secondary-text">是否付款</text>
						<view class="gui-form-body gui-flex gui-align-items-center gui-padding-x"
							v-if="tag=='manage'  || tag=='dl'  || info.yg_flag ">
							<gui-radio :checked="formData.is_pay==0" @change="sexPayType(0)">
								<text class="gui-text">未付款</text>
							</gui-radio>

							<gui-radio :checked="formData.is_pay ==1" @change="sexPayType(1)" class="gui-margin-x">
								<text class="gui-text">已付款</text>
							</gui-radio>
						</view>

						<view v-else class="gui-form-body gui-flex gui-align-items-center gui-padding-x">
							<view class="gui-text-small">{{info.is_pay==1?'已付款':'未付款'}}</view>
						</view>
					</view>
				</view>
			</view>


			<view v-if="info.o_status > 20 && base.show_base.fw_tpsc"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">服务前图片</text>
						</view>
						<hyb-upload ref="start_image" v-if="info.yg_flag==1" v-model="formData.start_image"
							:maxFileNumber="9">
						</hyb-upload>

						<hyb-preview v-else :items="info.start_image" class="gui-margin-top-middle">
						</hyb-preview>
						<!-- <hyb-preview type="video" :items="info.fa_videos" class="gui-margin-top-middle"></hyb-preview> -->
					</view>
				</view>
			</view>

			<view v-if="info.o_status > 20 && base.show_base.fw_tpsc"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">服务后图片</text>
						</view>
						<hyb-upload v-if="info.yg_flag==1" ref="end_image" v-model="formData.end_image"
							:maxFileNumber="9">
						</hyb-upload>
						<hyb-preview v-else :items="info.end_image" class="gui-margin-top-middle"></hyb-preview>
					</view>
				</view>
			</view>



			<view v-if="(tag=='manage' || tag=='dl' || info.yg_flag) && $store.state.base.cd_name && base.xq_zdy==1"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">其他信息</text>
						</view>
						<view class="gui-form-item gui-border-b"
							v-for="(item,index) in $store.state.base.cd_attributes">
							<text class="gui-form-label gui-secondary-text"
								v-if="formData.cd_attributes[item.label]">{{item.label}}</text>
							<view class="gui-form-body  gui-padding-x" v-if="formData.cd_attributes[item.label]">
								<hyb-preview v-if="item.type=='图片'" :items="[formData.cd_attributes[item.label]]">
								</hyb-preview>
								<input v-else type="number" class="gui-form-input"
									v-model="formData.cd_attributes[item.label]" disabled placeholder="" />
							</view>
						</view>
					</view>
				</view>
			</view>


			<view class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-space-between gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">
								{{ base.uniacid === 55 ? '付款凭证' : '备注信息' }}
							</text>

							<hyb-popup-input :upload="true"
								v-if="tag=='yh' || tag=='manage' || tag=='dl' || info.yg_flag"
								:title="base.uniacid === 55 ? '添加付款凭证' : '添加备注'" @comfirm="addBeizhu2">
								&#xe6c7; {{ base.uniacid === 55 ? '添加付款凭证' : '添加备注' }}
							</hyb-popup-input>

							<!-- <hyb-popup-input :upload="true" v-else-if="info.yg_flag && info.o_status > 15 " title="师傅备注"
								@comfirm="addBeizhu1">&#xe6c7; 添加备注
							</hyb-popup-input> -->
						</view>
						<view class="gui-border-b gui-padding-y" v-for="(item,index) in info.fa_beizhu">

							<hyb-preview v-if="item[0].indexOf('||') != -1"
								:items="JSON.parse(item[0].split('||')[1])"></hyb-preview>
							<view style="margin-left: 10rpx;" class="gui-text-small">{{item[0].split("||")[0]}}
							</view>
							<view style="margin-left: 10rpx; margin-top: 10rpx;"
								class="gui-color-gray gui-text-small gui-margin-top-middle-small gui-flex gui-space-between gui-align-items-center">
								<!-- <text>{{item[2]}}</text><text>{{item[1]}}</text> -->

								<text>{{item[2]}}</text>
								<text v-if="item[1] =='代理商备注'">平台客服</text>
								<text v-if="item[1] =='用户备注'">客户备注</text>
								<text v-else-if="item[1] !='代理商备注' && item[1] !='用户备注' ">{{item[1]}}</text>
								<view v-if="tag=='manage' || tag=='dl'" @tap="delte_bz(item,info.fa_id)"
									class="gui-text-small gui-bg-blue gui-color-white gui-padding-small gui-border-radius gui-icons">
									删除</view>
							</view>
						</view>
					</view>
				</view>
			</view>


			<!-- 	<view v-if="this.info.pingjia"
				class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">服务评价</text>
						</view>
						<hyb-comments :list="comments"></hyb-comments>
					</view>
				</view>
			</view> -->








			<!-- <view class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-border-b gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">付款方式：{{info.fa_fwpay_type}}</text>
						</view>
						<text class="gui-text-small gui-block gui-secondary-text"
							style="margin-top:10rpx;">费用：{{info.fa_fwmoney}}</text>
					</view>
				</view>
			</view>


			<view class="gui-card-view gui-bg-white gui-dark-bg-level-3  gui-margin-top-middle">
				<view class="gui-card-body gui-border-b gui-flex gui-rows gui-nowrap">
					<view class="gui-card-desc">
						<view class="gui-flex gui-rows gui-nowrap gui-align-items-center">
							<text class="gui-card-name gui-primary-text gui-bold">现场存档</text>
						</view>
						<text class="gui-text-small gui-block gui-secondary-text" style="margin-top:10rpx;">暂无数据</text>
					</view>
				</view>
			</view> -->

			<gui-popup :x_id="info.fa_id" ref="popup" position="bottom">
				<!-- 如果项目非常多，可以使用竖向滚动区域来实现 -->
				<view class="gui-bg-white">
					<view class="gui-padding gui-text-center">选择配件</view>
					<view v-if="lists.length >= 1"
						class="gui-padding-x gui-dark-bg-level-3 gui-flex gui-row gui-space-between gui-align-items-center gui-border-b">
						<view class="footerBtns">
							<gui-select-list :items="selectBtn" iconSize="42rpx" @change="btnChange" type="checkbox"
								checkedType="ring"></gui-select-list>
						</view>

					</view>
					<scroll-view :scroll-y="true" style="height: 50vh;" class="gui-relative gui-padding-x">
						<!-- 自定义DOM -->
						<gui-select-list v-if="lists.length >= 1" :items="lists" iconSize="42rpx" @change="change"
							type="checkbox" checkedType="ring" ref="selectList"></gui-select-list>
					</scroll-view>

					<hyb-button label="确认" @tap="doCheck"></hyb-button>
				</view>

			</gui-popup>


			<!-- <hyb-button v-if="!info.u_id" label="领取订单" @tap="lingqu()"></hyb-button> -->

			<!-- <hyb-button
				v-if="info.u_id && tag=='yg' && info.o_status==15 && info.qd_flag && info.fa_fwpay_type !='参与竞标'"
				label="抢单" @tap="qiangdan"></hyb-button> -->
			<!-- <hyb-button v-if="info.u_id && (info.yg_flag || tag=='manage' )  &&   info.o_status < 26 "
				label="提交" @tap="submit"></hyb-button> -->

			<hyb-button v-if="tag=='yg' && info.o_status==15 && info.qd_flag && info.fa_fwpay_type !='参与竞标'" label="抢单"
				@tap="qiangdan"></hyb-button>
			<hyb-button
				v-if="(( info.yg_flag  &&  tag=='yg') || ( base.je_dan_ms &&  (tag=='manage' || tag=='dl')) )  &&   base.show_base.fw_tpsc &&   info.o_status < 28 &&  info.o_status != 12   "
				label="提交" @tap="submit"></hyb-button>

			<view v-else style="height: 21rpx;"></view>
			<hyb-fuwu-time ref="timePopup" @change="confimTime"></hyb-fuwu-time>


			<hyb-peijian ref="peijian" v-if="loaded" v-model="ids" type="text" @change="peijianChange" disabled>
			</hyb-peijian>
		</template>

	</hyb-page>
</template>

<script>
	import moment from 'moment/moment';
	import graceJS from '@/Grace6/js/grace.js';
	export default {
		data() {
			return {
				ids: [],
				id: 0,
				xiaoxi: 0, //如果通过消息进入小程序的这里等于1，用于接口中处理一些业务
				t_y_id: '',
				info: {},
				// 选择列表
				peijians: [],
				formData: {
					is_pay: 0,
					start_image: [],
					end_image: [],
					cd_attributes: {}
				},
				items: [],
				lists: [],
				// 底部选择按钮
				selectBtn: [{
					title: "全选",
					checked: false
				}],
				tag: "",
				tag_name: '',
				loaded: false,
				heji_money: 0,
				comments: [],
				_mapContext: null,

				markers: [],
				fa_ordersn: ''
			}
		},

		onLoad(options) {
			if (options.id) {
				if (options.id.indexOf('fw_') === 0) {
					this.fa_ordersn = options.id.replace('fw_', '')
				} else {
					this.id = options.id
				}
			}

			this.tag = options.tag || "";
			if (options.t_y_id) {
				this.t_y_id = options.t_y_id;
			}
			if (this.tag == "dl") {
				this.tag_name = '代理商备注';
			} else if (this.tag == "gl") {
				this.tag_name = '管理员备注';
			} else if (this.tag == "yg") {
				this.tag_name = this.$store.state.base.show_base.shifu_bie_ming + '备注';
			} else if (this.tag == "yh") {
				this.tag_name = '用户备注';
			} else if (options.xiaoxi) {
				this.xiaoxi = options.xiaoxi;
			}
			if (this.tag == "ld") {
				uni.gPost("fadan/lingqu", {
					fa_id: this.id
				}).then((res) => {
					uni.showToast({
						title: "领取成功"
					})
					setTimeout(() => {
						uni.redirectTo({
							url: '/hyb_o2o/inner/pages/fabu/list?tag=yh'
						})
					}, 1500)
				})
			} else {
				this.query();
			}
		},
		onShow() {

		},
		computed: {
			base: () => {
				return uni.storage.get("base")
			},
			userinfo: () => {
				return uni.storage.get("userinfo")
			}
		},

		methods: {

			// 复制文本到剪贴板
			copyText(text) {
				if (!text) {
					this.showToast('内容为空，无法复制');
					return;
				}

				uni.setClipboardData({
					data: text,
					success: () => {
						this.showToast('复制成功');
					},
					fail: () => {
						this.showToast('复制失败，请手动复制');
					}
				});
			},

			// 显示提示框
			showToast(message) {
				uni.showToast({
					title: message,
					icon: 'none',
					duration: 1500
				});
			},
			// 将HTML元素转换为PDF
			getEndDate() {
				const times = this.info.fa_fwtime.split(' ')
				return moment(times[0]).add(this.info.o_num, 'day').format('YYYY-MM-DD ') + times[1]
			},

			privacy() {
				uni.previewImage({
					urls: ['https://xjz.cyygkj.cn/api/fadan/privacy?id=' + this.info.fa_id]
				})
			},

			call(phone) {
				uni.makePhoneCall({
					phoneNumber: phone
				})
			},

			daohang(flag) {
				uni.openLocation({
					latitude: flag ? parseFloat(this.info.fa_fwlatitude1) : parseFloat(this
						.info.fa_fwlatitude),
					longitude: flag ? parseFloat(this.info.fa_fwlongitude1) : parseFloat(this
						.info
						.fa_fwlongitude),
				})
			},
			changeTime() {
				this.$refs.timePopup.popup(this.id);
			},
			confimTime(time) {
				uni.showModal({
					title: this.info.fa_fwtime ? '修改预约时间' : '设置预约时间',
					content: "是否确认" + (this.info.fa_fwtime ? '修改预约时间' : '设置预约时间') + "?",
					success: (res) => {
						if (res.confirm) {
							uni.gPost("fadan/save", {
								fa_id: this.info.fa_id,
								fa_fwtime: time
							}).then((res) => {
								uni.showToast({
									title: "操作成功"
								})
								this.query();
							})
						}
					}
				})
			},
			lingqu() {
				uni.showModal({
					title: "订单确认",
					content: "是否确认领取该订单?",
					success: (res) => {
						if (res.confirm) {
							uni.gPost("fadan/lingqu", {
								fa_id: this.info.fa_id
							}).then((res) => {
								uni.showToast({
									title: "领取成功"
								})
								setTimeout(() => {
									uni.redirectTo({
										url: '/hyb_o2o/inner/pages/fabu/list?tag=yh'
									})
								}, 1500)
							})
						}
					}
				})
			},

			addBeizhu1(text, images) {
				uni.gPost("fadan/save", {
					fa_id: this.info.fa_id,
					tag_name: this.tag_name,
					fa_beizhu: [text + "||" + JSON.stringify(images), this.tag_name],
				}).then((res) => {
					this.query();
					uni.showToast({
						title: "提交成功"
					})
				})
			},

			addBeizhu2(text, images) {
				uni.gPost("fadan/save", {
					fa_id: this.info.fa_id,
					tag_name: this.tag_name,
					fa_beizhu: [text + "||" + JSON.stringify(images), this.tag_name],
				}).then((res) => {
					this.query();
					uni.showToast({
						title: "提交成功"
					})
				})
			},

			saveFormData(text) {
				let formData = this.info.form_data
				formData['bed_num'] = text
				uni.gPost("fadan/save", {
					fa_id: this.info.fa_id,
					form_data: formData
				}).then((res) => {
					this.query();
					uni.showToast({
						title: "提交成功"
					})
				})
			},
			saveFormData1(text) {
				let formData = this.info.form_data
				formData['id_num'] = text
				uni.gPost("fadan/save", {
					fa_id: this.info.fa_id,
					form_data: formData
				}).then((res) => {
					this.query();
					uni.showToast({
						title: "提交成功"
					})
				})
			},

			qiangdan() {
				uni.gPost("fadan/qiangdan", {
					fa_id: this.info.fa_id
				}).then((res) => {
					if (res.indexOf('保证金') > -1) {
						uni.showToast({
							title: res,
						})
						this.$refs.bzj.open();
					} else if (res.indexOf('会员') > -1) {
						uni.showToast({
							title: res,
							icon: 'error'
						})
					} else {
						uni.showToast({
							title: "抢单成功",
							success: () => {
								this.query()
							}
						})
					}
				})
			},


			kaoqin() {
				// uni.navigateTo({
				// 	url: "/hyb_o2o/inner/pages/kaoqin/kaoqin?fa_id=" + this.info.fa_id
				// })
			},

			async qiandao() {
				let location = await uni.location.getLocation();
				console.log(location)
				if (location) {
					uni.gPost("fadan/qiandao", {
						latitude: location.latitude,
						longitude: location.longitude,
						fa_id: this.info.fa_id,
					}).then((data) => {
						this.info.qiandao = data;
						uni.showToast({
							title: "签到成功"
						})
					})
				}
			},

			sexPayType(flag) {
				this.formData.is_pay = flag;
			},

			submit() {
				let peijians = [];
				this.items.forEach((item) => {
					peijians.push({
						p_id: item.p_id,
						p_jinjia: item.p_jinjia,
						p_jiage: item.p_jiage,
						p_name: item.p_name,
						amount: item.amount
					})
				})
				this.formData["peijians"] = peijians;
				this.formData["fa_id"] = this.info.fa_id;
				this.formData["fa_fwmoney"] = this.info.fa_fwmoney;
				this.formData["fa_lin_shi_money"] = this.info.fa_lin_shi_money;
				this.formData["fa_pei_jian_cb"] = this.info.fa_pei_jian_cb;


				if (this.info.yg_flag) {
					this.$refs.start_image.upload(() => {
						this.$refs.end_image.upload(() => {
							uni.gPost("fadan/save", this.formData).then(() => {
								this.query();
								setTimeout(() => {
									uni.showToast({
										title: "提交成功"
									})
								}, 2000)
							})
						});
					});

				} else {
					uni.gPost("fadan/save", this.formData).then(() => {
						this.query();
						setTimeout(() => {
							uni.showToast({
								title: "提交成功"
							})
						}, 2000)
					})
					// this.query();
				}


			},

			amoutChange(val) {
				this.items[val[1]]["amount"] = val[0];
				let money = 0;
				this.items.forEach((item) => {
					money += parseFloat(item.amount * item.p_jiage)
				})
				this.info.pei_jian_money = money;
				this.heji_money = parseFloat(money) + parseFloat(this.info.fa_lin_shi_money);

			},

			doCheck() {
				let that = this;
				let items = [];
				let amount = 1;
				let item = null;
				this.lists.forEach((item0, index) => {
					if (item0.checked) {
						item = that.peijians[index];
						amount = 1;
						that.items.forEach((item1) => {
							if (item1.p_id == item.p_id) {
								amount = item1.amount;
							}
						})
						item.amount = amount;
						items.push(item);
					}
				})
				this.items = items;
				this.$refs.popup.close();
			},

			change: function(e) {
				if (e.length >= this.lists.length) {
					this.selectBtn[0].title = "取消";
					this.selectBtn[0].checked = true;
				} else {
					this.selectBtn[0].title = "全选";
					this.selectBtn[0].checked = false;
				}
			},
			btnChange: function(e) {
				var status = false;
				if (e.length > 0) {
					status = true;
					this.selectBtn[0].checked = true;
					this.selectBtn[0].title = "取消";
				} else {
					this.selectBtn[0].checked = false;
					this.selectBtn[0].title = "全选";
				}
				var tmpArr = [];
				this.lists.forEach((item) => {
					item.checked = status;
					tmpArr.push(item);
				});
				this.lists = [];
				this.$nextTick(() => {
					this.lists = tmpArr;
				});
			},
			remove: function() {
				// 获取选中的数据索引
				var indexs = this.$refs.selectList.getSelectedIndex();
				if (indexs.length < 1) {
					uni.showToast({
						title: "请选择数据",
						icon: "none"
					});
					return;
				}
				uni.showModal({
					title: '提示',
					content: '确定要删除选中数据吗?',
					success: (res) => {
						if (res.confirm) {
							var tmpArr = [];
							this.lists.forEach((item, idx) => {
								if (graceJS.arrayIndexOf(indexs, idx) == -1) {
									tmpArr.push(item);
								}
							});
							this.lists = tmpArr;
						}
					}
				});
			},
			peijianChange(data) {
				let items = [];
				let money = 0;
				data.forEach((item) => {
					items.push({
						p_id: item.p_id,
						p_name: item.p_name,
						p_jiage: item.p_jiage,
						p_jinjia: item.p_jinjia,
						amount: 1
					})
					money += parseFloat(item.p_jiage);
				})
				this.info.pei_jian_money = money;
				this.items = items;
			},
			async open() {
				if (this.info.fa_tzmoney != 0) {
					uni.showModal({
						title: "提醒信息",
						content: "此订单尾款未支付，尾款支付后才能添加配件，或将尾款调整为0元",
						showCancel: false,

					})
					this.query();
					return;
				} else if (this.info.o_status < 25) {
					uni.showModal({
						title: "提醒信息",
						content: "订单开始服务后才能添加配件！",
						showCancel: false,

					})
					this.query();
					return;
				}
				this.$refs.peijian.open();
				// if (this.peijians.length == 0) {
				// 	this.peijians = await uni.gPost("peijian/list");
				// 	let checked = false;
				// 	this.peijians.forEach((item) => {

				// 		checked = false;

				// 		this.info.peijians.forEach((item1) => {
				// 			if (item.p_id == item1.p_id) {
				// 				checked = true;
				// 			}
				// 		})

				// 		this.lists.push({
				// 			title: item.p_name,
				// 			desc: "￥" + item.p_jiage,
				// 			checked: checked
				// 		})
				// 	})
				// }

				// this.$refs.popup.open();
			},
			call(phone) {
				uni.makePhoneCall({
					phoneNumber: phone
				})
			},

			query() {
				this.loaded = false;
				uni.gPost("fadan/info", {
					fa_ordersn: this.fa_ordersn,
					id: this.id,
					t_y_id: this.t_y_id,
					xiaoxi: this.xiaoxi
				}).then((info) => {
					console.log(1249)
					console.log(info)
					this.info = info;
					this.id = info.fa_id;
					let markers = [];
					markers.push({
						id: 1,
						latitude: info.fa_fwlatitude,
						longitude: info.fa_fwlongitude,
						label: {
							content: '出发点'
						},
						iconPath: '/static/location.png',
						width: 20,
						height: 20
					});
					markers.push({
						id: 2,
						latitude: info.fa_fwlatitude1,
						longitude: info.fa_fwlongitude1,
						label: {
							content: '到达点'
						},
						iconPath: '/static/location.png',
						width: 20,
						height: 20
					});

					if (info.box) {
						markers.push({
							id: 3,
							latitude: info.box.latitude,
							longitude: info.box.longitude,
							label: {
								content: '当前位置'
							},
							iconPath: '/static/location.png',
							width: 20,
							height: 20
						});
					}

					this.markers = markers;



					let item = null;
					let that = this;
					that.items = [];
					that.ids = [];

					this.info.peijians.forEach((item0) => {
						console.log(item0)
						that.ids.push(item0.p_id);
						item = item0.peijian;
						item.amount = item0.amount;
						that.items.push(item);
					})
					this.formData.hui_tong = this.info.hui_tong;
					this.formData.qian_tong = this.info.qian_tong;
					this.formData.is_pay = this.info.is_pay;
					this.formData.start_image = this.info.start_image;
					this.formData.end_image = this.info.end_image;
					this.formData.cd_attributes = this.info.cd_attributes || {};
					this.heji_money = parseFloat(this.info.fa_lin_shi_money) + parseFloat(this.info
						.pei_jian_money);
					// console.log(this.formData)

					if (this.info.pingjia) {
						this.comments.push(this.info.pingjia);
					}

					this.loaded = true;
				})
			},

			confirm_baojia(info) {

				uni.showModal({
					title: "报价确认",
					content: "是否确认该报价费用：" + info.jishi_money + "元",
					success: (res) => {

						if (res.confirm) {
							uni.gPost("qiangdan/save", {
								q_id: info.q_id,
								jishi_money: info.jishi_money,
								q_styles: "已录用"
							}).then(() => {
								uni.showToast({
									title: "操作成功"
								})
								uni.redirectTo({
									url: "/hyb_o2o/inner/pages/fabu/list?tag=yh"
								})
							})
						}
					}
				})

			},


			choose(info) {
				// if (info.q_styles == "待确认" && this.info.yh_flag) {
				// 	uni.showActionSheet({
				// 		itemList: ["录用TA", "拒绝TA", "查看TA信息"],
				// 		success: (res) => {
				// 			if (res.tapIndex == 0) {
				// 				uni.gPost("qiangdan/save", {
				// 					q_id: info.q_id,
				// 					q_styles: "已录用"
				// 				}).then(() => {
				// 					uni.showToast({
				// 						title: "操作成功"
				// 					})
				// 					setTimeout(() => {
				// 						this.query();
				// 					}, 1500)
				// 				})
				// 			} else if (res.tapIndex == 0) {

				// 			} else if (res.tapIndex == 2) {
				// 				uni.navigateTo({
				// 					url: "/hyb_o2o/jishi/info/info?id=" + info.y_yuangong
				// 				})
				// 			}
				// 		}
				// 	})
				// } else {
				uni.navigateTo({
					url: "/hyb_o2o/jishi/info/info?id=" + info.q_yuangong
					// url: "/hyb_o2o/jishi/info/info?id=" + info.q_yuangong + "&t_y_id" + this.id
				})
				// }
			}
		}
	}
</script>

<style>
	.gui-card-view {
		padding: 10rpx 30rpx;
	}

	.gui-card-img {
		width: 100rpx;
		height: 100rpx;
		border-radius: 80rpx;
	}

	.gui-card-desc {
		width: 400rpx;
		/* margin-left: 25rpx; */
		flex: 1;
	}

	.gui-form-label {
		width: 160rpx;
	}

	.gui-card-name {
		font-size: 32rpx;
		/* margin-bottom: 20rpx; */
		margin-right: 20rpx;
	}

	/* .gui-text-small {
		line-height: 40rpx;
		font-size: 24rpx;
	} */

	.gui-card-footer {
		margin-top: 25rpx;
	}

	.gui-card-footer-item {
		width: 100rpx;
		text-align: center;
		flex: 1;
		line-height: 38rpx;
		font-size: 26rpx;
	}

	/* #ifndef APP-NVUE */
	.gui-card-footer-item {
		display: block;
	}

	.gui-box-shadow {
		box-shadow: 0px 0px 3rpx #999999;
	}

	/* #endif */
</style>